package com.snail.controller;

import com.snail.common.DeleteRequest;
import com.snail.model.dto.CoursePageListDto;
import com.snail.model.pojo.BizCoursesBase;
import com.snail.response.BaseResponse;
import com.snail.response.PageResponse;
import com.snail.service.BizCoursesBaseService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @author Monica
 * @description
 * @date 2025/7/17 22:45
 */
@RestController
@RequestMapping("/coursesBase")
@AllArgsConstructor
public class BizCoursesBaseController {

    private final BizCoursesBaseService bizCoursesBaseService;

    @GetMapping("/getCoursePageList")
    public PageResponse<BizCoursesBase> getCoursePageList(CoursePageListDto coursePageListDto) {
        return bizCoursesBaseService.getCoursePageList(coursePageListDto);
    }
    @PostMapping("/addCourseBase")
    public BaseResponse addCourseBase(@RequestBody BizCoursesBase bizCoursesBase) {
        return bizCoursesBaseService.addCourseBase(bizCoursesBase);
    }
    @PostMapping("/updateCourseBase")
    public BaseResponse updateCourseBase(@RequestBody BizCoursesBase bizCoursesBase) {
        return bizCoursesBaseService.updateCourseBase(bizCoursesBase);
    }
    @PostMapping("/deleteCourseBase")
    public BaseResponse deleteCourseBase(@RequestBody DeleteRequest deleteRequest) {
        return bizCoursesBaseService.deleteCourseBase(deleteRequest);
    }

}
